﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ChiDao.Component.Utils;
using ChiDao.Site.Models;
using ChiDao.Business.Models.Account;
using ChiDao.Business.Models.Security;

namespace ChiDao.Business.Service
{
    /// <summary>
    ///     账户模块站点业务契约
    /// </summary>
    public interface IAccountService
    {
        #region 属性

        /// <summary>
        /// 获取 用户信息查询数据集
        /// </summary>
        IQueryable<Person> Persons { get; }

        /// <summary>
        /// 获取 用户扩展信息查询数据集
        /// </summary>
        IQueryable<PersonExtend> PersonExtends { get; }

        /// <summary>
        /// 获取 登录记录信息查询数据集
        /// </summary>
        IQueryable<LoginLog> LoginLogs { get; }

        /// <summary>
        /// 获取 角色信息查询数据集
        /// </summary>
        //IQueryable<Role> Roles { get; }

        #endregion

        /// <summary>
        ///     用户登录
        /// </summary>
        /// <param name="model">登录模型信息</param>
        /// <returns>业务操作结果</returns>
        OperationResult Login(LoginModel model);

        /// <summary>
        ///     用户退出
        /// </summary>
        void Logout();

        OperationResult Add(PersonView view);
    }
}